Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

af-packet: clean up IPS config check #12397

Closed
wants to merge 1 commit into from

Conversation

victorjulien
Copy link
Member

Don't emmit generic error statements on things that are not errors. Instead, for cases where (part of) the config is missing, use the defaults and log only a more detailed explanation at the 'config' level.

Minor code cleanups.

Don't emmit generic error statements on things that are not errors. Instead,
for cases where (part of) the config is missing, use the defaults and log
only a more detailed explanation at the 'config' level.

Minor code cleanups.
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 45.00000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 80.62%. Comparing base (078c646) to head (fb73a4e).
Report is 68 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12397      +/-   ##
==========================================
- Coverage   80.63%   80.62%   -0.02%     
==========================================
  Files         917      917              
  Lines      258687   258686       -1     
==========================================
- Hits       208601   208553      -48     
- Misses      50086    50133      +47     
Flag Coverage Δ
fuzzcorpus 56.81% <0.00%> (+<0.01%) ⬆️
livemode 19.54% <45.00%> (+0.15%) ⬆️
pcap 44.25% <0.00%> (-0.01%) ⬇️
suricata-verify 63.22% <0.00%> (-0.01%) ⬇️
unittests 58.51% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24221

const char *live_dev = LiveGetDeviceName(ldev);
if (live_dev == NULL) {
SCLogError("Problem with config file");
return -1;
SCLogConfig("no 'af-packet' section for '%s' in the yaml, default to IDS", live_dev);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was not obvious from LiveGetDeviceName but looks indeed correct

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it should use ldev as live_dev will be null here

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work :-)

CI : 🟢
Code : good
Commits segmentation : ok
Commit messages : nit typo /emmit/emit/
Git ID set : looks fine for me
CLA : you already contributed
Doc update : not needed
Redmine ticket : not needed
Rustfmt : no rust
Tests : not needed I guess
Dependencies added: none

@victorjulien
Copy link
Member Author

replaced by #12510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants